namespace go admin_user
include "error_code.thrift"
struct User{
	1:  i64    ID             (api.body = "id")
	2:  string Name           (api.body = "name")
	4:  string Email          (api.body = "email")
	5:  i64    LastLoginTime  (api.body = "last_login_time")
	6:  string Avatar         (api.body = "avatar")
	7:  i64    Points         (api.body = "points")
}

struct GetUserInfoRequest{
	1:  i64 UserID  (api.body = "user_id")
}

struct GetUserInfoResponse{
	1:  error_code.ErrorCode Code  (api.body = 'code')
	2:  User                 Data  (api.body = 'data')
}

struct GetUserListRequest{
	1:  i64 Page = 1  (api.query = "page")
	2:  i64 Size = 20 (api.query = "size")
}

struct GetUserListResponse{
	1:  error_code.ErrorCode Code   (api.body = 'code')
	2:  list<User>           Data   (api.body = 'data')
	4:  i64                  Total  (api.body = 'total')
}

struct AddUserPointsRequest{
	1:  i64 UserID  (api.body = "user_id")
	2:  i64 Points  (api.body = "points")
}

struct AddUserPointsResponse{
	1:  error_code.ErrorCode Code  (api.body = 'code')
}
